package com.biz.primus.management.depot.feign;

import com.biz.primus.management.depot.degraded.DegradedGeoFeignClient;
import com.biz.primus.model.geo.vo.AreaResponseVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * GeoFeignClient
 *
 * @author JKLiues
 * @date 2017年10月27日
 */
@FeignClient(qualifier = "geoFeignClient", name = "service-geo", fallback = DegradedGeoFeignClient.class)
public interface GeoFeignClient {
    /**
     * 查全省
     */
    @GetMapping("soa/geoService/findAllProvince")
    List<AreaResponseVo> findAllProvince();

    /**
     * 查市
     *
     * @param provinceId 省ID
     */
    @GetMapping("soa/geoService/findCitiesByProvinceId")
    List<AreaResponseVo> findCitiesByProvinceId(Long provinceId);

    /**
     * 查区
     *
     * @param cityId 市ID
     */
    @GetMapping("soa/geoService/findDistrictsByCityId")
    List<AreaResponseVo> findDistrictsByCityId(Long cityId);
}